package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;

public class UserServiceImpl implements UserService {
    private String name;
    private String age;
    private UserDao userDao;

    /*public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
*/

    public UserServiceImpl(String name, String age, UserDao userDao) {
        this.name = name;
        this.age = age;
        this.userDao = userDao;
    }

    @Override
    public void save() {
            System.out.println("UserServiceImpl save is running...");

        System.out.println(name );
        System.out.println(age);
        userDao.save();
        }
    }

